import torch
import torch.nn.functional as F

input_tensor = torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0])
softmax_output = F.softmax(input_tensor, dim=0)
print("Softmax Output:", softmax_output)

# Softmax Output: tensor([5.7661e-04, 1.5674e-03, 4.2606e-03, 1.1582e-02, 3.1482e-02, 8.5577e-02,
#        2.3262e-01, 6.3233e-01])
